package com.czxy.domain;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class CartItem {

    //该购物车项  对应的商品信息
    private  Product product;

    //购买数量
    private Integer count;

    //小计金额
    private  Double subTotal;



    //小计金额的 计算
    public   Double getSubTotal(){

        subTotal = count * product.getShopPrice();
        return subTotal;
    }







}
